﻿@using Fyp.Models
@{
    Layout = "~/Shared/_layoutPage.cshtml";
    var PageTitle = "ReserveProject";
   
}
@section title
{
 @PageTitle
}

<html>
<head><title></title>
    <link rel="stylesheet" type="text/css" href="~/Styles/template.css" media="screen">
    <style>
        #last {
            margin-top: 10px;
        }

        #dd {
            margin-top: 20px;
        }
        #main {
            margin-left:5px;
           
        }
        #t1 {
            margin-top:80px;
        }

        #de{
            margin-right: 100px;
            
            margin-bottom: -15px;
            margin-left: 100px;
        }
    </style>
    <script src="../../Scripts/jquery-1.7.1.js" type="text/javascript"> </script>
    <script type="text/javascript">
        var count = 0;
        var c = 0;
        $(document).ready(function () {

            //$('#main').appendTo(document.body);
            //$('#ff').appendTo('#main');

            $("#b1").click(function () {
                count++;
                if (count < 6) {
                    if (count == 1) {
                        $('<div id="div1"> </div>').insertAfter("#ruf");
                        $('#div1').append('<label>Student regsiter Id : </label>')
                        $('#div1').append('<input type="text" name="Id1" id="Id1" placeholder = "Student Id"></input>');
                        var n = $("#Id1").text();
                        //$('#ff').append('<input type="hidden" name="n" value="'+n+'"></input>');

                        $('#div1').append('<label>Student Name : </label>')
                        $('#div1').append('<input type="text" name="Name1" id="Name1" placeholder = "Student Name"></input>');
                        var s = $("#Name1").val();
                        //$('#ff').append('<input type="hidden" name="s" value="'+s+'"> </input>');

                        $('#div1').append('<label>Email : </label>');
                        $('#div1').append('<input type="text" name="Email1" id="Email1" placeholder = "Student Email"></input>');
                        var e = $("#Email1").val();
                    }
                    //$('#main').appendTo(document.body);
                    //$('#ff').appendTo('#main');
                    if (count == 2) {
                        $('<div id="div2"> </div>').insertAfter("#div1");
                        $('#div2').append('<label>Student regsiter Id : </label>')
                        $('#div2').append('<input type="text" name="Id2" id="Id2" placeholder = "Student Id"></input>');

                        $('#div2').append('<label>Student Name : </label>');
                        $('#div2').append('<input type="text" name="Name2" id="Name2" placeholder = "Student Name"></input>');

                        $('#div2').append('<label>Email : </label>');
                        $('#div2').append('<input type="text" name="Email2" id="Email2" placeholder = "Student Email"></input>');
                    }
                    if (count == 3) {

                        $('<div id="div3"> </div>').insertAfter("#div2");
                        $('#div3').append('<label>Student regsiter Id : </label>')
                        $('#div3').append('<input type="text" name="Id3" id="Id3" placeholder = "Student Id"></input>');

                        //$('#ff').append('<input type="hidden" name="n" value="'+n+'"></input>');

                        $('#div3').append('<label>Student Name : </label>')
                        $('#div3').append('<input type="text" name="Name3" id="Name3" placeholder = "Student Name"></input>');
                        //  var s = $("#Name1").val();
                        //$('#ff').append('<input type="hidden" name="s" value="'+s+'"> </input>');

                        $('#div3').append('<label>Email : </label>');
                        $('#div3').append('<input type="text" name="Email3" id="Email3" placeholder = "Student Email"></input>');
                        // var e = $("#Email1").val();
                        //$('#ff').append('<input type="hidden" name="e" value="'+e+'"></input>');                      
                    }
                    if (count == 4) {

                        $('<div id="div4"> </div>').insertAfter("#div3");
                        $('#div4').append('<label>Student regsiter Id : </label>')
                        $('#div4').append('<input type="text" name="Id4" id="Id4" placeholder = "Student Id"></input>');

                        $('#div4').append('<label>Student Name : </label>');
                        $('#div4').append('<input type="text" name="Name4" id="Name4" placeholder = "Student Name"></input>');

                        $('#div4').append('<label>Email : </label>');
                        $('#div4').append('<input type="text" name="Email4" id="Email4" placeholder = "Student Email"></input>');
                    }
                    if (count == 5) {

                        $('<div id="div5"> </div>').insertAfter("#div4");
                        $('#div5').append('<label>Student regsiter Id : </label>')
                        $('#div5').append('<input type="text" name="Id5" id="Id5" placeholder = "Student Id"></input>');

                        $('#div5').append('<label>Student Name : </label>');
                        $('#div5').append('<input type="text" name="Name5" id="Name5" placeholder = "Student Name"></input>');

                        $('#div5').append('<label>Email : </label>');
                        $('#div5').append('<input type="text" name="Email5" id="Email5" placeholder = "Student Email"></input>');
                        $('#div5').append('<br></br>');
                    }
                }
                else {
                    alert("you can't add more than 5 students in agroup");
                }

                c++;

                alert(count);
                $('<input type="hidden" name="count" value="' + count + '"></input>').appendTo("#ff");

                //  alert(cnt);
            });

                $('#chk1').change(function(){

                        $('input[name=chk2]').attr('checked', false);

                        $('input[name=chk1]').attr('checked', true);


                }
                );

                $('#chk2').change(function () {

                    $('input[name=chk1]').attr('checked', false);

                    $('input[name=chk2]').attr('checked', true);


                }
                );
                $('#chk3').change(function () {

                    $('input[name=chk4]').attr('checked', false);

                    $('input[name=chk3]').attr('checked', true);


                }
               );

                $('#chk4').change(function () {

                    $('input[name=chk3]').attr('checked', false);

                    $('input[name=chk4]').attr('checked', true);


                }
                );
                $('#chk5').change(function () {

                    $('input[name=chk6]').attr('checked', false);
                    $('input[name=chk7]').attr('checked', false);
                    $('input[name=chk8]').attr('checked', false);
                    $('input[name=chk9]').attr('checked', false);
                    $('input[name=chk5]').attr('checked', true);


                }
               );

                $('#chk6').change(function () {

                    $('input[name=chk5]').attr('checked', false);
                    $('input[name=chk7]').attr('checked', false);
                    $('input[name=chk8]').attr('checked', false);
                    $('input[name=chk9]').attr('checked', false);
                    $('input[name=chk6]').attr('checked', true);


                }
                );
                $('#chk7').change(function () {

                    $('input[name=chk5]').attr('checked', false);
                    $('input[name=chk6]').attr('checked', false);
                    $('input[name=chk8]').attr('checked', false);
                    $('input[name=chk9]').attr('checked', false);
                    $('input[name=chk7]').attr('checked', true);


                }
               );
                $('#chk8').change(function () {

                    $('input[name=chk5]').attr('checked', false);
                    $('input[name=chk7]').attr('checked', false);
                    $('input[name=chk6]').attr('checked', false);
                    $('input[name=chk9]').attr('checked', false);
                    $('input[name=chk8]').attr('checked', true);


                }
               );
            ////  cnt=c;
        });

    </script>


</head>
   
<body class="background">
      
    <div id="content"><h2 style="text-align: center;margin-bottom:-40px;"><b>Reserve Project</b></h2><br/></div>
     <div id="main" class="background">
       
 
    <form method="post" action="/ReserveProject/SendRequest" enctype="multipart/form-data" id="ff" class="background">
        <div id="de" class="background">
         <table id="t1">
               <tbody>
                   <tr>
                       <td>
        <label>Project Title</label></td><td>
        <input type="text" name="projTitle" id="projTitle" placeholder = "Project Title" required /></td>
        </tr><tr>
<td>
        <label>Advisor Name</label></td><td>
        <input type="text" name="projAdvisor" id="projAdvisor" placeholder = "Advisor Name" required/></td>
       </tr>

  <tr>
<td>
        <label>Advisor Email</label></td><td>
        <input type="text" name="projAdvisorEmail" id="projAdvisorEmail" placeholder = "Advisor Email" required/></td>
   </tr>
       
       <tr>
           <td>
        <label>Description :</label></td>
           
           <td>
               <textarea name="Des" id="Des" cols="30" rows="4" placeholder = "Description"> </textarea></td>
           </tr>
           </tbody>
               </table>
        <br />
             <fieldset style="margin-right:-40px">
             <legend>Create Group</legend>
                <div id="ruf">
                 <input type="button" id="b1" value="Add Student"/>
       
                </div>
           
       
            </fieldset>
     
        <div id="last">
            <label>Type of project : </label>
            <label>Research</label>
            <input type="checkbox" value="chk1" id="chk1" name="chk1" />


            <label>Development</label>
            <input type="checkbox" value="chk2" id="chk2" name="chk2"  />
            <br />

            <label>Development Technology : </label>


            <label>ObjectOriented</label>
            <input type="checkbox" value="ObjectOriented" id="chk3" name="chk3" />

            <label>Structured</label>
            <input type="checkbox" value="Structured" id="chk4" name="chk4" />

            <br />
            <label>Plateform : </label>
            <label>WebBased</label>
            <input type="checkbox" value="WebBased" id="chk5" name="chk5" />
            <label>Distributed</label>
            <input type="checkbox" value="Distributed" id="chk6" name="chk6" />
            <label>DesktopBased</label>
            <input type="checkbox" value="DesktopBased" id="chk7" name="chk7" />
            <label>Setup Configuration</label>
            <input type="checkbox" value="Setup Configuration" id="chk8" name="chk8" />
            <label>Other</label>
            <input type="checkbox" value="Other" id="chk9" name="chk9" />
            <br />

            <label>Reserved</label>
            <input type="checkbox" value="Status" id="chk_sts" name="chk_sts" />
            <br />

            <input type="submit" value="Send Request" class = "buttonSave" style=" margin-top: 9px;padding: 7px;margin-bottom: 11px;" class="buttonSave"  />
            
        </div>
            </div>
           </form>
            </div>
     
</body>
</html>
